using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Pegasus.Threading;
using System.Threading;
using Pegasus.Diagnostics;
using Pegasus.Data.SqlClient;

namespace Pegasus.UnitTests.Threading
{
    /// <summary>
    /// Summary description for ThreadingSqlAppScheduler2Test
    /// </summary>
    [TestClass]
    public class ThreadingSqlAppScheduler2Test
    {
        [TestMethod]
        public void ThreadingTestAppSchedulerSQL()
        {
/*
 * TODO: Need to write this so it's not dependant on this server...
 * 
            DateTime startTime = DateTime.Now;

            TestTask testTask = new TestTask();
            SQLAppScheduler2 scheduler = new SQLAppScheduler2( new SqlDatabaseConnection( "combizdev04", "FullServiceGenealogy" ) );
            scheduler.ScheduleTask( testTask );

            Thread.Sleep( 7000 );
            TraceCode.WriteLine( "TestTask count = {0} at 7 seconds", testTask.Count );
            Assert.AreEqual<int>( 2, testTask.Count );

            Thread.Sleep( 9000 );
            TraceCode.WriteLine( "TestTask count = {0} at 16 seconds", testTask.Count );
            Assert.AreEqual<int>( 6, testTask.Count );

            Assert.IsTrue( !scheduler.IsScheduledTask( testTask ) );
*/
       }
    }
}
